// function extendPrototype(sources, destination) {
//   var i;
//   var len = sources.length;
//   var sourcePrototype;
//   for (i = 0; i < len; i += 1) {
//     sourcePrototype = sources[i].prototype;
//     for (var attr in sourcePrototype) {
//       if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
//     }
//   }
// }

let extendPrototype = extendClass
function extendClass(sourcesClasses, destinationClass) {
  sourcesClasses.forEach((sourcesClass)=>{
    Object.getOwnPropertyNames(sourcesClass.prototype).forEach((methodName)=>{
      if (sourcesClass.prototype.hasOwnProperty(methodName)){
        destinationClass.prototype[methodName]=sourcesClass.prototype[methodName];
      }
    })
  })
}

function getDescriptor(object, prop) {
  return Object.getOwnPropertyDescriptor(object, prop);
}

function createProxyFunction(prototype) {
  function ProxyFunction() {}
  ProxyFunction.prototype = prototype;
  return ProxyFunction;
}

export {
  extendPrototype,
  getDescriptor,
  createProxyFunction,
  extendClass
};
